package com.ticket.sass.admin.annotation

import io.swagger.annotations.ApiModel
import lombok.Data


@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
annotation class Loggable(val module: Module, val desc: String)

@Data
@ApiModel
class ModuleText(val module: String, val chineseName: String)

enum class Module(val chineseName: String) {
    ADMIN("管理员"),
    CINEMA("影院"),
    COUPON("优惠券"),
    COMMODITY("卖品"),
    FILM("影片"),
    FILM_SCHEDULE("排期"),
    CONFIG("配置"),
    ORDER("订单"),
    PRICE_SCHEME("票价方案"),
    HALL("影厅"),
    COMMODITY_DISPATCH("卖品配送"),
    PAY_AFTER_WATCH("先看后付"),
    BANNER("横幅"),
    MEMBER("会员");

    companion object {
        fun getModuleTextList(): List<ModuleText> {
            return values().map { ModuleText(it.name, it.chineseName) }
        }
    }
}



